package com.program.facesigninsystem.dao;

import com.program.facesigninsystem.entity.Friend;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface IFriendDao {
    /****
     * 添加好友
     * @param user_id
     * @param friend_id
     */
    void insertFriend(@Param("user_id")String user_id,@Param("friend_id")String friend_id);

    /****
     * 判断是否已成好友
     * @param user_id
     * @param friend_id
     * @return
     */
    Friend selectExist(@Param("user_id")String user_id,@Param("friend_id")String friend_id);

    /****
     * 好友排名
     * @param user_id
     * @return
     */
    List<Map<String,Object>> selectByOrder(@Param("user_id")String user_id);

    /****
     * 总排名
     * @return List<Map<String,Object>>
     */
    List<Map<String,Object>> overallRanking();

    List<Map<String,Object>> scoreRank();
}
